package com.example.demo.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hanfei
 * @since 2020-04-08
 */
@Repository
public interface UserMapper extends BaseMapper<User> {
        List<User> findByKey(Pagination page, @Param("key") String key);
        List<User> findByKeyAndAll(Pagination page, @Param("key") String key, @Param("entity") User entity);
        User findByUsername(String username);
        User login(@Param("username") String username, @Param("password") String password);

}
